import './assets/main.css'
import './assets/unified-markdown.css'

import { createApp } from 'vue'
import App from './App.vue'
import router from './router/index.js'

// Element Plus
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

// Vue Quill 编辑器
import { QuillEditor } from '@vueup/vue-quill'
import '@vueup/vue-quill/dist/vue-quill.snow.css'

// 统一 Markdown 编辑器
import UnifiedMarkdownEditor from './components/UnifiedMarkdownEditor.vue'

const app = createApp(App)

// 注册路由
app.use(router)

// 注册Element Plus
app.use(ElementPlus)

// 注册统一Markdown编辑器组件
app.component('UnifiedMarkdownEditor', UnifiedMarkdownEditor)

// 注册Vue Quill编辑器组件
app.component('VueQuill', QuillEditor)

// 注册所有图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

app.mount('#app')
